﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace parkingclient
{
    public partial class findred : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["user"] == null)
            {
                lblWelcome.Text = "[<a href='user_login.aspx'>Login</a>]   [<a href='registration.aspx'>Register</a>]";
            }
            else if (int.Parse(Session["userType"].ToString()) == 3) //for admin, add link to the admin dashboard
            {
                lblWelcome.Text = "Welcome " + Session["user"] + "   [<a href='admin_dashboard.aspx'>Admin Dashboard</a>]    [<a href='user_logout.aspx'>Logout</a>]";
            }
            else
            {
                lblWelcome.Text = "Welcome " + Session["user"] + "   [<a href='user_logout.aspx'>Logout</a>]";
            }
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            Response.Redirect("confirmation.aspx?resid=" + TextBox1.Text);
        }
    }
}